import request from '@/utils/request'

// 查询IP池列表
export function listPool(query) {
  return request({
    url: '/training/pool/list',
    method: 'get',
    params: query
  })
}

// 查询IP池详细
export function getPool(id) {
  return request({
    url: '/training/pool/' + id,
    method: 'get'
  })
}

// 新增IP池
export function addPool(data) {
  return request({
    url: '/training/pool',
    method: 'post',
    data: data
  })
}

// 修改IP池
export function updatePool(data) {
  return request({
    url: '/training/pool',
    method: 'put',
    data: data
  })
}

// 删除IP池
export function delPool(id) {
  return request({
    url: '/training/pool/' + id,
    method: 'delete'
  })
}

/**
 * 修改ip池范围
 * @param {*} data 
 * @returns 
 */
export function changeIpPool(data){
  return request({
    url: '/training/pool/betweenBatchInsert',
    method: 'post',
    data: data
  })
}